import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'


const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/home/HomeView.vue'),
    meta: {
      title: '首页',
      showTabbar: true
    }
  }, {
    path: '/login',
    name: 'login',
    component: () => import('../views/other/LoginView.vue'),
    meta: {
      title: '登录',
      showTabbar: false
    }
  }, {
    path: '/car',
    name: 'car',
    component: () => import('../views/car/CarView.vue'),
    meta: {
      title: '购物车',
      showTabbar: false
    }
  }, {
    path: '/my',
    name: 'my',
    component: () => import('../views/my/MyView.vue'),
    meta: {
      title: '我的',
      showTabbar: true
    }
  }, {
    path: '/question',
    name: 'question',
    component: () => import('../views/my/QuestionView.vue'),
    meta: {
      title: '常见问题',
      showTabbar: false
    }
  }, {
    path: '/introduct',
    name: 'introduct',
    component: () => import('../views/my/IntroductView.vue'),
    meta: {
      title: '我的地址',
      showTabbar: false
    }
  }, {
    path: '/about',
    name: 'about',
    component: () => import('../views/my/AboutView.vue'),
    meta: {
      title: '关于我们',
      showTabbar: false
    }
  }, {

    path: '/category',
    name: 'category',
    component: () => import('../views/home/CategoryView.vue'),
    meta: {
      title: '预约洗衣',
      showTabbar: false
    }

  }, {
    path: '/order',
    name: 'order',
    component: () => import('../views/order/OrderView.vue'),
    meta: {
      title: '订单',
      showTabbar: false
    },
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/other/registerView.vue'),
    meta: {
      title: '注册',
      showTabbar: false
    }
  },
  {
    path: '/revise',
    name: 'revise',
    component: () => import('../views/other/ReviseView.vue'),
    meta: {
      title: '修改密码',
      showTabbar: false
    }
  },
  {
    path: '/address',
    name: 'address',
    component: () => import('../views/my/Address.vue'),
    meta: {
      title: '新增地址',
      isNav: false,
      login: true,
    }
  },
{
  path:'/contact',
  name:'contact',
  component: () => import('../views/my/ContactView.vue'),
  meta:{
    title:'联系店长',
    isNav:false,
    login:true,
}
},
{
  path:'/confirm',
  name:'confirm',
  component: () => import('../views/order/ConfirmView.vue'),
  meta:{
    title:'确认订单',
    isNav:false,
    login:true,
}
},
  {
    path: '/forget',
    name: 'forget',
    component: () => import('../views/other/ForgetView.vue'),
    meta: {
      title:'忘记密码',
      showTabbar: false
    }
  }, {
    path: '/revise',
    name: 'revise',
    component: () => import('../views/other/ReviseView.vue'),
    meta: {
      title:'修改密码',
      showTabbar: false
    }
  }, {
    path: '/member',
    name: 'member',
    component: () => import('../views/my/MemberView.vue'),
    meta: {
      title:'会员充值',
      showTabbar: false
    }
  }, {
    path: '/redbag',
    name: 'redbag',
    component: () => import('../views/my/RedbagView.vue'),
    meta: {
      title:'红包卡卷',
      showTabbar: false
    }
  },
  {
    path: '/agreement',
    name: 'agreement',
    component: () => import('../views/my/AgreementView.vue'),
    meta: {
      title:'用户协议',
      showTabbar: false
    }
  },
  {
    path: '/contact',
    name: 'contact',
    component: () => import('../views/my/ContactView.vue'),
    meta: {
      title:'联系店长',
      showTabbar: false
    }
  },{
    path:'/details',
    name:'details',
    component: () => import('../views/order/DetailsView.vue'),
    meta:{
      title:'订单详情',
      showTabbar: false
    }
  },
  {
    path:'/redbag',
    name:'redbag',
    component: () => import('../views/my/RedbagView.vue'),
    meta:{
      title:'红包卡卷',
      showTabbar: false
    }
  }

]


const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
